package com.songcha.sakura.download.base

import android.os.Parcel
import android.os.Parcelable
import com.songcha.sakura.download.base.DownloadTask
import com.songcha.sakura.download.IDownloadManager
import com.songcha.sakura.download.IDownloaderListener

class Downloader() : IDownloader {
    constructor(parcel: Parcel) : this() {
    }

    override fun download(task: DownloadTask, listener: IDownloaderListener, iDownloadManager: IDownloadManager):Int {
        return 0
    }

    override fun validateUrl(url: String): Boolean {
        return false
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        //super.writeToParcel(parcel, flags)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<Downloader> {
        override fun createFromParcel(parcel: Parcel): Downloader {
            return Downloader(parcel)
        }

        override fun newArray(size: Int): Array<Downloader?> {
            return arrayOfNulls(size)
        }
    }
}